/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package commons.codec;

import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.net.URLCodec;



/**
 *
 * @author WangShuai
 */
public class TestURLCodec {
    public static void main(String[] args) throws EncoderException {
        URLCodec c = new URLCodec();
        System.out.println(c.encode("http://www.baidu.com/s?wd=春节"));  //对URL的各个部分进行分别编码
    }
}
